﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="sonicERPinterface.Charp.WebForm1" %>

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>C# Csharp</title>
 
<link href="UI/themes/base/jquery.ui.all.css" rel="stylesheet" type="text/css" />
<script src="UI/jquery-1.4.2.js" type="text/javascript"></script>
<script src="UI/ui/jquery.ui.core.js" type="text/javascript"></script>
<script src="UI/ui/jquery.ui.widget.js" type="text/javascript"></script>
<script src="UI/ui/jquery.ui.position.js" type="text/javascript"></script>
<script src="UI/ui/jquery.ui.autocomplete.js" type="text/javascript"></script>
<script src="UI/ui/minified/jquery.ui.tooltip.js" type="text/javascript"></script>

<script  type="text/javascript">
    $(function () {

        $("#tags").autocomplete({

            source: function (request, response) {
                sonicERPinterface.Charp.dal.retornarclientes(request.term, function (data) {

                    var json = eval(data);

                    response($.map(json, function (item) { return { label: item} }));

                });

            }

        });

    });

    $("#tags").tooltip({
        bodyHandler: function () {
            return $("<UI/themes/base/images/ui-icons_cd0a0a_256x240.png>").attr("src", this.src);
        }
    });
    $(document).ready(function () {
        var i, styles, tooltipCount, content;

        // Setup a styles array and tooltip count variable
        tooltipCount = 0;
        styles = ['dark', 'cream', 'green', 'red', 'light', 'blue'];

        // Define the tooltip creator method
        function createTooltip() {
            // Setup the content string
            content = '';
            for (i = 0; i < tooltipCount; i++)
                content += (i > -1) ? ' tooltip\'s ' : 'tooltip ';

            // If tooltip count is greater than 7, exit
            if (++tooltipCount == styles.length + 1) return;

            // Initialize the tooltip on the previous tooltip
            this.elements.tooltip.qtip(
      {
          content: 'I\'m a' + content + ' tooltip!', // Concat. the generated content string
          position: {
              corner: {
                  tooltip: 'topMiddle',
                  target: 'bottomMiddle'
              },
              adjust: {
                  resize: true,
                  scroll: true
              }
          },
          show: { ready: true }, // Show the tooltips when they're ready
          hide: false, // Don't hide them
          style: {
              name: styles[tooltipCount - 1],
              width: { max: 700 }, // Set a high max width so the text doesn't wrap
              tip: true // Give them tips with auto corner detection
          },

          // Refer back to this function onRender
          api: { onRender: createTooltip }
      });
        }

        // Create first tooltip targetting the first h2 in the #content element
        createTooltip.call({ elements: { tooltip: $('#content h3:first')} });
    });
 
      
</script>

<style type="text/css" >

	
#map 
{
	 width:669px; 
	 height:351px;
	  background-image:url('map.jpg');
	   position:relative;
	   }

#map div 
{
	 width: 120px; 
           height:60px; 
           position:absolute; 
           cursor:pointer; 
           -repeat:no-repeat;
           }


</style>

</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1"  runat="server" >
    <Services>
    <asp:ServiceReference Path="~/dal.asmx" />
    </Services>
    </asp:ScriptManager>
    <div>
    <asp:Button ID="btnxml" Text="Gerar Xml" runat="server" onclick="btnxml_Click" />
        </div>
        <br />
       
        <br />
        <div id="busca" >
                   <label for="tags">Busca Clientes</label> 
          <%--  <asp:TextBox  ID="tags"  runat="server"></asp:TextBox>--%>
              <input id="tags"  title="Digite o Texto Aqui Para Busca" />          
             
            
        </div>
        <div id="map">
     <div id="america"></div>
     <div id="europe"></div>
     <div id="africa"></div>
     <div id="asia"></div>
     <div id="australia"></div>
     <div id="southAmerica"></div>
</div>
    </form>
</body>
</html>
